1. Field of the Invention
This invention relates to the field of data communications networks. More particularly, this invention relates to a method and apparatus for implementing a quality of service (QoS) policy in a data communications network so as to thereby prioritize network traffic into a plurality of service levels and provide preferential treatment of different classes of data traffic on the data communications network. A number of priority levels may be implemented in accordance with the invention.
2. Background
This invention relates to switched packet data communications networks. There are a number of different packet types which are used in modern switched packet data communications networks.
FIG. 1A depicts a generic packet 8 using Layer 2 encapsulation. A number of different Layer 2 encapsulation protocols are recognized. Each may include a MAC (media access control) destination address 10 and a MAC source address 12. The data 14 may include Layer 3 encapsulated packet information. A CRC (cyclic redundancy check) 16 may also be provided at the end of the Layer 2 encapsulation. The optional flow information block 18 may include an Ethernet type for Ethernet V 2.0 (ARPA) packets. The Ethernet type may include (IP)v4(IP), IPX, AppleTalk, DEC Net, Vines IP/Vines Echo, XNS, ARP, or RARP. Other known encapsulations include SAP, SAP1, SNAP, and the like. The meaning of the bits in block 18 and the size of block 18 differs among the different encapsulation protocols. This information is sometimes referred to as the Layer 2 Flow Information.
One special case of Layer 2 encapsulation is the IEEE 802.1q frame shown schematically in FIG. 1B. The IEEE 802.1q frame (or packet) 20 has a MAC Destination Address (“DA”) 10, a MAC Source Address (“SA”) 12, a Data Portion 14, and a CRC 16. In addition, within block 18 is the IEEE 802.1q “tag” 22 which includes, among other items, a block of three priority (“PRI”) bits 24. These three bits are also known as a “Class of Service” or “CoS” field.
FIG. 1C depicts the Layer 3 and Layer 4 structure of a typical IP packet. The IP packet format will be detailed here by way of example because it is presently one of the most common Layer 3 packet types. The fields of importance to this disclosure are the “ToS value” or type of service 26 which is a preferably an 8-bit field also known as the Differentiated Service (“DS”) field, the “prot-typ” or IP protocol type 28 (typically either TCP (transmission control protocol) or UDP (user datagram protocol)), the Source IP address 30 (usually the IP address of the originating station), the Destination IP address 32 (usually the IP address of the ultimate destination station), the Layer 4 source port number 34 (available for TCP and UDP packets only), and the Layer 4 destination port number 36 (available for TCP and UDP packets only). The Layer 3 flow information includes the information before the source port number 34. The Layer 4 flow information includes the Source and Destination ports 34, 36. The Layer 4 flow information may be used to identify a particular packet flow as being the product of (source port) or directed to (destination port) a particular application. The ToS and CoS fields are used by routers of the data communications network to provide priority/delay/dropping services.
As the use of data communications networks increases worldwide, congestion of those networks has become a problem. A given data communications network, a given node on a data communications network, or a given link connecting two nodes has a certain capacity to pass data packets and that capacity cannot be exceeded. When data traffic on the data communications network becomes heavy enough that one can anticipate congestion problems, it is desirable to implement a “Quality of Service” or QoS policy so as to give priority to certain types of traffic and restrict the flow of other types of traffic, thus assuring that critical communications are able to pass through the data communications network, albeit at the expense of less critical communications.
One of the problems that network devices face in implementing quality of service solutions is in identifying and grouping transmissions to be given preferential treatment or to be restricted, that is, to prioritize the traffic in accordance with the Quality of Service policy established for the network. This becomes especially critical as bandwidth increases substantially over certain links while other links remain relatively slow resulting in traffic speed mismatches which, in turn, cause bottlenecks to data traffic over the relatively slow links. Such groupings must be consistently applied to traffic and must be applied at the rate that the traffic is passing without introducing additional delays or bottlenecks. Such groupings may be, for example, by protocol type, by destination IP address, by source IP address, by destination/source IP address pair, by source port and/or destination port (Layer 4), and the like.
Routers have, in the past, kept packet counts and rate limited packets in software, but router software has not scaled to the level of being able to process millions of packets per second through a node, providing the basic routing functions that they are required to provide and being able to also provide the rate limitation function.
One approach to identifying and grouping transmissions is for the host to categorize packets by use of the L2 CoS field, L3 ToS field, or both. The primary disadvantage of this approach is that it removes control from the system administrator and requires one to trust the end stations to the communication to properly implement the QoS policy. In some cases this trust cannot be justified. In addition, an end station only sees its own packets and therefore is unaware of the overall resource requirements within the data communications network and cannot make allowances for these requirements.
Accordingly, a Quality of Service policy controlled by a network system administrator is needed together with a mechanism for applying it at the full data rate of the data communications network.